package self.hoy.demo.cloud.sentinel.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.stereotype.Service;

/**
 * @author 三共小不
 * @date 2021/7/6
 */
@Service
public class TestService {
    public static final String RESOURCE_NAME = "sayHello";

    @SentinelResource(RESOURCE_NAME)//用来标识资源是否被限流、降级
    public String sayHello(String name) {
        return "Hello, " + name;
    }
}
